Skip to content

Upgrade Next.js to 16.2.9#804

Merged
rajat1saxena merged 3 commits into
mainfrom
issue-802-v2
Jul 11, 2026
Merged

Upgrade Next.js to 16.2.9#804
rajat1saxena merged 3 commits into
mainfrom
issue-802-v2

Conversation

@clbotdev

Copy link
Copy Markdown
Collaborator

Closes #802

Summary

  • Bump next from ^16.0.10 to ^16.2.9 and eslint-config-next to ^16.2.9 in apps/web/package.json
  • Fix TypeScript errors in test files exposed by stricter Mongoose lean() return types in this Next.js version:
    • Cast findOne().lean() results to any where the union type T[] | T blocked property access
    • Cast course.courseId to any where ObjectId & string was expected
    • Add non-null assertion on groups! where CourseModel.create() result has optional field typing
    • Use as unknown as jest.Mock for better-auth session casts that no longer overlap with Mock<any,any,any>
    • Cast membership as any when checking a property set by the function under test

Test plan

  • pnpm --filter @courselit/web exec tsc --noEmit --skipLibCheck — no errors
  • pnpm test — 641 tests passing across 79 test suites
  • pnpm lint — no lint errors
  • pnpm prettier — no formatting changes

🤖 Generated with Claude Code

Ubuntu and others added 3 commits June 18, 2026 19:21
Fix TypeScript errors in test files caused by stricter Mongoose lean()
return types and better-auth session type changes in Next 16.2.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rajat1saxena rajat1saxena self-requested a review July 11, 2026 11:06
@rajat1saxena rajat1saxena merged commit c066376 into main Jul 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to Next 16.2

2 participants